<template>
  <div class="app-content">
    <dk-table ref="DkTableRef" table-api="/gs_gold/admin.route_tag_group" :cache-table="!getDev()" :hide-buttons="['recycle']">
      <template #emoji="{ row }">
        <div class="size-40px flex justify-center items-center text-36px">{{ row.emoji }}</div>
      </template>
    </dk-table>
    <dk-dialog v-model="showTag" width="1000px" title="标签列表" top="15vh">
      <RouteTagList :group-id="chooseId"></RouteTagList>
    </dk-dialog>
  </div>
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { getDev } from '@/utils/auth'
import RouteTagList from '../tag/List.vue'

defineOptions({
  name: 'RouteTagGroupList'
})
const DkTableRef = ref()
const showTag = ref(false)
const chooseId = ref(0)
onMounted(() => {
  DkTableRef.value.DkTable.onClickButton((event: string, data: any) => {
    if (event == 'tag') {
      chooseId.value = data.row.id
      showTag.value = true
    }
  })
})
</script>
<style></style>
